package src.com.doit.Demo05;

public class Cat {
    private String name;
    private String color;

    public Cat(){}//无参构造
    public Cat(String name, String color) {//带参构造

        this.name = name;
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public void catching()
    {
        System.out.println(name+" "+color+"的猫,抓了只老鼠");
    }
    public void show()
    {
        System.out.println(name+color);
    }

}
